<%@ page pageEncoding="UTF-8" contentType="text/html; UTF-8" %>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <!-- Meta tags -->
    <title>Winter Login Form a Simple Login form Responsive Widget :: w3layouts</title>
    <%--	<meta name="keywords" content="Winter Login Form Responsive widget, Flat Web Templates, Android Compatible web template,--%>
    <%--	Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />--%>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- stylesheets -->
    <link rel="stylesheet" href="css/font-awesome.css">
    <link rel="stylesheet" href="css/style.css">
    <!-- google fonts  -->
    <link href="//fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
    <link href="//fonts.googleapis.com/css?family=Raleway:400,500,600,700" rel="stylesheet">
    <script>
        function refreshCode() {
            //1.获取验证码图片对象
            var vcode = document.getElementById("vcode");

            //2.设置其src属性，加时间戳
            // vcode.src = "${pageContext.request.contextPath}/checkCodeServlet?time=" + new Date().getTime();

        }
    </script>
</head>
<body>
<div class="agile-login">
    <h1>个人博客</h1>
    <div class="wrapper">
        <h2>登录</h2>
        <div class="w3ls-form">
            <form action="<%=request.getContextPath()%>/login" method="post">
                <label>账号</label>
                <input type="text" name="account" placeholder="请输入您的账号" required/>
                <label>密码</label>
                <input type="text" name="password" placeholder="请输入您的密码" required/>
                <label>验证码</label>
                <div style="overflow: hidden">
                    <input type="text" name="code" id="verifycode" placeholder="请输入图片上的文字" required
                           style="width:50%;float: left"/>
                    <a style="display: contents">
                        <img src="${pageContext.request.contextPath}/patchca.png" onclick="this.src=this.src+'?'+Math.random();" title="看不清点击刷新"
                             style="float: right;" id="code">
                    </a>
                </div>
                <a href="" class="pass">忘记密码 ?</a>
                <p style="color: red">${logError}</p>
                <input type="submit" value="登录"/>
                <a href="<%=request.getContextPath()%>/add.jsp"><input type="button" value="注册"/></a>
            </form>
        </div>

        <div class="agile-icons">
            <a href="#"><span class="fa fa-twitter" aria-hidden="true"></span></a>
            <a href="#"><span class="fa fa-facebook"></span></a>
            <a href="#"><span class="fa fa-pinterest-p"></span></a>
        </div>
    </div>
    <br>
</div>
</body>
</html>
